<template>
	<div class="step1">
		<ul class="uls">
			<li class="lis">
				<div class="div2">
					<el-popover placement="top-start" width="200" trigger="hover" :content="$store.getters.hoverPerty.riskInfo.isRiskMeasures">
						<el-form slot="reference">
							<el-form-item label="是否有风控措施：预警、止损、最大回撤及其他风控措施等">
								<span v-if="['6'].includes(dataType)">
									<span
										style="color: red"
										v-if="publicCompare('isRiskMeasures', '是否有风控措施：预警、止损、最大回撤及其他风控措施等', 'riskInfo')"
										>(未复核)</span
									>
								</span>
							</el-form-item>
						</el-form>
					</el-popover>
				</div>
				<div class="div2">
					<el-radio-group v-model="riskInfo.isRiskMeasures" :disabled="isBaseDisabled" @change="focusUpdate">
						<el-radio label="0">是</el-radio>
						<el-radio label="1">否</el-radio>
					</el-radio-group>
				</div>
				<div class="div2">
					<el-popover placement="top-start" width="200" trigger="hover" :content="$store.getters.hoverPerty.riskInfo.investLeverRate">
						<el-form slot="reference">
							<el-form-item label="投资杠杆率上限（总资产/净资产）%">
								<span v-if="['6'].includes(dataType)">
									<span style="color: red" v-if="publicCompare('investLeverRate', '投资杠杆率上限（总资产/净资产）%', 'riskInfo')"
										>(未复核)</span
									>
								</span>
							</el-form-item>
						</el-form>
					</el-popover>
				</div>
				<div class="div2">
					<el-input v-model="riskInfo.investLeverRate" :disabled="isBaseDisabled" @input="scale(riskInfo, 'investLeverRate')"></el-input>
				</div>
			</li>

			<li class="lis">
				<div class="div2">
					<el-popover placement="top-start" width="200" trigger="hover" :content="$store.getters.hoverPerty.riskInfo.earlyWarnLine">
						<el-form slot="reference">
							<el-form-item label="有无预警线">
								<span v-if="['6'].includes(dataType)">
									<span style="color: red" v-if="publicCompare('earlyWarnLine', '有无预警线', 'riskInfo')">(未复核)</span>
								</span>
							</el-form-item>
						</el-form>
					</el-popover>
				</div>
				<div class="div3">
					<el-radio-group
						v-model="riskInfo.earlyWarnLine"
						:disabled="isBaseDisabled"
						@change="changeClear(['earlyWarnNetWorth', 'earlyWarnLineType'])"
					>
						<el-radio label="0">有</el-radio>
						<el-radio label="1">无</el-radio>
					</el-radio-group>
				</div>
			</li>

			<li v-if="riskInfo.earlyWarnLine === '0'" class="lis">
				<div class="div2">
					<el-popover placement="top-start" width="200" trigger="hover" :content="$store.getters.hoverPerty.riskInfo.earlyWarnLineType">
						<el-form slot="reference">
							<el-form-item label="预警线类型" required>
								<span v-if="['6'].includes(dataType)">
									<span style="color: red" v-if="publicCompare('earlyWarnLineType', '预警线类型', 'riskInfo')">(未复核)</span>
								</span>
							</el-form-item>
						</el-form>
					</el-popover>
				</div>
				<div class="div2">
					<el-select
						@change="focusUpdate"
						v-model="riskInfo.earlyWarnLineType"
						filterable
						clearable
						:disabled="isBaseDisabled"
						:remote-method="earlyRemoteMethod"
						remote
						reserve-keyword
						:loading="netWorloading"
					>
						<el-option key="" label="--请选择--" value=""> </el-option>
						<el-option v-for="(item, index) in earlyWarnLineTypeList" :key="index + 'a'" :label="item.typeName" :value="item.typeName">
						</el-option>
					</el-select>
					<div class="blurmsg" v-if="isCheck && !!!riskInfo.earlyWarnLineType">请选择预警线类型</div>
				</div>
				<div class="div2">
					<el-popover placement="top-start" width="200" trigger="hover" :content="$store.getters.hoverPerty.riskInfo.earlyWarnNetWorth">
						<el-form slot="reference">
							<el-form-item label="预警线对应的资产管理计划净值" required>
								<span v-if="['6'].includes(dataType)">
									<span style="color: red" v-if="publicCompare('earlyWarnNetWorth', '预警线对应的资产管理计划净值', 'riskInfo')"
										>(未复核)</span
									>
								</span>
							</el-form-item>
						</el-form>
					</el-popover>
				</div>
				<div class="div2">
					<el-input
						v-model="riskInfo.earlyWarnNetWorth"
						:disabled="isBaseDisabled"
						@input="scale(riskInfo, 'earlyWarnNetWorth')"
					></el-input>
					<div class="blurmsg" v-if="isCheck && !!!riskInfo.earlyWarnNetWorth">请输入预警线对应的资产管理计划净值</div>
				</div>
			</li>

			<li class="lis">
				<div class="div2">
					<el-popover placement="top-start" width="200" trigger="hover" :content="$store.getters.hoverPerty.riskInfo.stopLossLine">
						<el-form slot="reference">
							<el-form-item label="有无止损线">
								<span v-if="['6'].includes(dataType)">
									<span style="color: red" v-if="publicCompare('stopLossLine', '有无止损线', 'riskInfo')">(未复核)</span>
								</span>
							</el-form-item>
						</el-form>
					</el-popover>
				</div>
				<div class="div3">
					<el-radio-group
						v-model="riskInfo.stopLossLine"
						:disabled="isBaseDisabled"
						@change="changeClear(['stopLossNetWorth', 'stopLossLineType'])"
					>
						<el-radio label="0">有</el-radio>
						<el-radio label="1">无</el-radio>
					</el-radio-group>
				</div>
			</li>

			<li v-if="riskInfo.stopLossLine === '0'" class="lis">
				<div class="div2">
					<el-popover placement="top-start" width="200" trigger="hover" :content="$store.getters.hoverPerty.riskInfo.stopLossLineType">
						<el-form slot="reference">
							<el-form-item label="止损线类型" required>
								<span v-if="['6'].includes(dataType)">
									<span style="color: red" v-if="publicCompare('stopLossLineType', '止损线类型', 'riskInfo')">(未复核)</span>
								</span>
							</el-form-item>
						</el-form>
					</el-popover>
				</div>
				<div class="div2">
					<el-select
						@change="focusUpdate"
						v-model="riskInfo.stopLossLineType"
						filterable
						clearable
						:disabled="isBaseDisabled"
						:remote-method="stopRemoteMethod"
						remote
						reserve-keyword
						:loading="netWorloading"
					>
						<el-option key="" label="--请选择--" value=""> </el-option>
						<el-option v-for="(item, index) in earlyWarnLineTypeList" :key="index + 'a'" :label="item.typeName" :value="item.typeName">
						</el-option>
					</el-select>
					<div class="blurmsg" v-if="isCheck && !!!riskInfo.stopLossLineType">请选择止损线类型</div>
				</div>
				<div class="div2">
					<el-popover placement="top-start" width="200" trigger="hover" :content="$store.getters.hoverPerty.riskInfo.stopLossNetWorth">
						<el-form slot="reference">
							<el-form-item label="止损线对应的资产管理计划净值" required>
								<span v-if="['6'].includes(dataType)">
									<span style="color: red" v-if="publicCompare('stopLossNetWorth', '止损线对应的资产管理计划净值', 'riskInfo')"
										>(未复核)</span
									>
								</span>
							</el-form-item>
						</el-form>
					</el-popover>
				</div>
				<div class="div2">
					<el-input v-model="riskInfo.stopLossNetWorth" :disabled="isBaseDisabled" @input="scale(riskInfo, 'stopLossNetWorth')"></el-input>
					<div class="blurmsg" v-if="isCheck && !!!riskInfo.stopLossNetWorth">请输入止损线对应的资产管理计划净值</div>
				</div>
			</li>

			<li class="lis">
				<div class="div2">
					<el-popover placement="top-start" width="200" trigger="hover" :content="$store.getters.hoverPerty.riskInfo.maxRetreat">
						<el-form slot="reference">
							<el-form-item label="有无回撤预警线">
								<span v-if="['6'].includes(dataType)">
									<span style="color: red" v-if="publicCompare('maxRetreat', '有无回撤预警线', 'riskInfo')">(未复核)</span>
								</span>
							</el-form-item>
						</el-form>
					</el-popover>
				</div>
				<div class="div3">
					<el-radio-group
						v-model="riskInfo.maxRetreat"
						:disabled="isBaseDisabled"
						@change="changeClear(['retreatWarnLineType', 'retreatEarlyWarnNetWorth'])"
					>
						<el-radio label="0">有</el-radio>
						<el-radio label="1">无</el-radio>
					</el-radio-group>
				</div>
			</li>

			<li v-if="riskInfo.maxRetreat === '0'" class="lis">
				<div class="div2">
					<el-popover placement="top-start" width="200" trigger="hover" :content="$store.getters.hoverPerty.riskInfo.retreatWarnLineType">
						<el-form slot="reference">
							<el-form-item label="回撤预警线类型" required>
								<span v-if="['6'].includes(dataType)">
									<span style="color: red" v-if="publicCompare('retreatWarnLineType', '回撤预警线类型', 'riskInfo')">(未复核)</span>
								</span>
							</el-form-item>
						</el-form>
					</el-popover>
				</div>
				<div class="div2">
					<el-select
						@change="focusUpdate"
						v-model="riskInfo.retreatWarnLineType"
						filterable
						clearable
						:disabled="isBaseDisabled"
						:remote-method="retrRemoteMethod"
						remote
						reserve-keyword
						:loading="netWorloading"
					>
						<el-option key="" label="--请选择--" value=""> </el-option>
						<el-option v-for="(item, index) in retracementList" :key="index + 'a'" :label="item.typeName" :value="item.typeName">
						</el-option>
					</el-select>
					<div class="blurmsg" v-if="isCheck && !!!riskInfo.retreatWarnLineType">请选择回撤预警线类型</div>
				</div>
				<div class="div2">
					<el-popover
						placement="top-start"
						width="200"
						trigger="hover"
						:content="$store.getters.hoverPerty.riskInfo.retreatEarlyWarnNetWorth"
					>
						<el-form slot="reference">
							<el-form-item label="回撤预警线对应的资产管理计划净值" required>
								<span v-if="['6'].includes(dataType)">
									<span
										style="color: red"
										v-if="publicCompare('retreatEarlyWarnNetWorth', '回撤预警线对应的资产管理计划净值', 'riskInfo')"
										>(未复核)</span
									>
								</span>
							</el-form-item>
						</el-form>
					</el-popover>
				</div>
				<div class="div2">
					<el-input
						v-model="riskInfo.retreatEarlyWarnNetWorth"
						:disabled="isBaseDisabled"
						@input="scale(riskInfo, 'retreatEarlyWarnNetWorth')"
					></el-input>
					<div class="blurmsg" v-if="isCheck && !!!riskInfo.retreatEarlyWarnNetWorth">请输入回撤预警线对应的资产管理计划净值</div>
				</div>
			</li>

			<li class="lis">
				<div class="div2">
					<el-popover placement="top-start" width="200" trigger="hover" :content="$store.getters.hoverPerty.riskInfo.stopLossWarningLine">
						<el-form slot="reference">
							<el-form-item label="有无回撤止损线">
								<span v-if="['6'].includes(dataType)">
									<span style="color: red" v-if="publicCompare('stopLossWarningLine', '有无回撤止损线', 'riskInfo')">(未复核)</span>
								</span>
							</el-form-item>
						</el-form>
					</el-popover>
				</div>
				<div class="div3">
					<el-radio-group
						v-model="riskInfo.stopLossWarningLine"
						:disabled="isBaseDisabled"
						@change="changeClear(['retreatStopLossNetWorth', 'retreatStopLossLineType'])"
					>
						<el-radio label="0">有</el-radio>
						<el-radio label="1">无</el-radio>
					</el-radio-group>
				</div>
			</li>

			<li v-if="riskInfo.stopLossWarningLine === '0'" class="lis">
				<div class="div2">
					<el-popover
						placement="top-start"
						width="200"
						trigger="hover"
						:content="$store.getters.hoverPerty.riskInfo.retreatStopLossLineType"
					>
						<el-form slot="reference">
							<el-form-item label="回撤止损线类型" required>
								<span v-if="['6'].includes(dataType)">
									<span style="color: red" v-if="publicCompare('retreatStopLossLineType', '回撤止损线类型', 'riskInfo')"
										>(未复核)</span
									>
								</span>
							</el-form-item>
						</el-form>
					</el-popover>
				</div>
				<div class="div2">
					<el-select
						@change="focusUpdate"
						v-model="riskInfo.retreatStopLossLineType"
						filterable
						clearable
						:disabled="isBaseDisabled"
						:remote-method="lintRemoteMethod"
						remote
						reserve-keyword
						:loading="netWorloading"
					>
						<el-option key="" label="--请选择--" value=""> </el-option>
						<el-option v-for="(item, index) in retracementList" :key="index + 'a'" :label="item.typeName" :value="item.typeName">
						</el-option>
					</el-select>
					<div class="blurmsg" v-if="isCheck && !!!riskInfo.retreatStopLossLineType">请选择回撤止损线类型</div>
				</div>
				<div class="div2">
					<el-popover
						placement="top-start"
						width="200"
						trigger="hover"
						:content="$store.getters.hoverPerty.riskInfo.retreatStopLossNetWorth"
					>
						<el-form slot="reference">
							<el-form-item label="回撤止损线对应的资产管理计划净值" required>
								<span v-if="['6'].includes(dataType)">
									<span
										style="color: red"
										v-if="publicCompare('retreatStopLossNetWorth', '回撤止损线对应的资产管理计划净值', 'riskInfo')"
										>(未复核)</span
									>
								</span>
							</el-form-item>
						</el-form>
					</el-popover>
				</div>
				<div class="div2">
					<el-input
						v-model="riskInfo.retreatStopLossNetWorth"
						:disabled="isBaseDisabled"
						@input="scale(riskInfo, 'retreatStopLossNetWorth')"
					></el-input>
					<div class="blurmsg" v-if="isCheck && !!!riskInfo.retreatStopLossNetWorth">请输入回撤止损线对应的资产管理计划净值</div>
				</div>
			</li>

			<li class="lis">
				<div class="div2">
					<el-popover placement="top-start" width="200" trigger="hover" :content="$store.getters.hoverPerty.riskInfo.otherRiskStep">
						<el-form slot="reference">
							<el-form-item label="有无其他风控措施">
								<span v-if="['6'].includes(dataType)">
									<span style="color: red" v-if="publicCompare('otherRiskStep', '有无其他风控措施', 'riskInfo')">(未复核)</span>
								</span>
							</el-form-item>
						</el-form>
					</el-popover>
				</div>
				<div class="div3">
					<el-radio-group v-model="riskInfo.otherRiskStep" :disabled="isBaseDisabled" @change="changeClear(['otherRiskExpression'])">
						<el-radio label="0">有</el-radio>
						<el-radio label="1">无</el-radio>
					</el-radio-group>
				</div>
			</li>

			<li class="lis" v-if="riskInfo.otherRiskStep === '0'">
				<div class="div2">
					<el-popover placement="top-start" width="200" trigger="hover" :content="$store.getters.hoverPerty.riskInfo.otherRiskExpression">
						<el-form slot="reference">
							<el-form-item label="其他风控措施-合同表述" required>
								<span v-if="['6'].includes(dataType)">
									<span style="color: red" v-if="publicCompare('otherRiskExpression', '其他风控措施-合同表述', 'riskInfo')"
										>(未复核)</span
									>
								</span>
							</el-form-item>
						</el-form>
					</el-popover>
				</div>
				<div class="div3">
					<el-input
						type="textarea"
						v-model="riskInfo.otherRiskExpression"
						:disabled="isBaseDisabled"
						show-word-limit
						style="width: 100%"
						@input="focusUpdate"
					></el-input>
					<div class="blurmsg" v-if="isCheck && !!!riskInfo.otherRiskExpression">请输入其他风控措施-合同表述</div>
				</div>
			</li>

			<template v-if="$store.state.fundStep.specialBaseInfo.planType === '2'">
				<li class="lis">
					<div class="div2">
						<el-popover
							placement="top-start"
							width="200"
							trigger="hover"
							:content="$store.getters.hoverPerty.riskInfo.managerIsInvestment"
						>
							<el-form slot="reference">
								<el-form-item label="管理人是否投入资金" required>
									<span v-if="['6'].includes(dataType)">
										<span style="color: red" v-if="publicCompare('managerIsInvestment', '管理人是否投入资金', 'riskInfo')"
											>(未复核)</span
										>
									</span>
								</el-form-item>
							</el-form>
						</el-popover>
					</div>
					<div class="div3">
						<el-radio-group
							v-model="riskInfo.managerIsInvestment"
							:disabled="isBaseDisabled"
							@change="changeClear(['managerInvestmentAmount', 'managerInvestmentRatio'])"
						>
							<el-radio label="0">有</el-radio>
							<el-radio label="1">无</el-radio>
						</el-radio-group>
						<div class="blurmsg" v-if="isCheck && !!!riskInfo.managerIsInvestment">请确认管理人是否投入资金</div>
					</div>
				</li>

				<li class="lis" v-if="riskInfo.managerIsInvestment === '0'">
					<div class="div2">
						<el-popover
							placement="top-start"
							width="200"
							trigger="hover"
							:content="$store.getters.hoverPerty.riskInfo.managerInvestmentAmount"
						>
							<el-form slot="reference">
								<el-form-item label="管理人投入资金参与金额" required>
									<span v-if="['6'].includes(dataType)">
										<span style="color: red" v-if="publicCompare('managerInvestmentAmount', '管理人投入资金参与金额', 'riskInfo')"
											>(未复核)</span
										>
									</span>
								</el-form-item>
							</el-form>
						</el-popover>
					</div>
					<div class="div2">
						<el-input v-model="riskInfo.managerInvestmentAmount" :disabled="isBaseDisabled" @input="focusUpdate"></el-input>
						<div class="blurmsg" v-if="isCheck && !!!riskInfo.managerInvestmentAmount">请输入管理人投入资金参与金额</div>
					</div>
					<div class="div2">
						<el-popover
							placement="top-start"
							width="200"
							trigger="hover"
							:content="$store.getters.hoverPerty.riskInfo.managerInvestmentRatio"
						>
							<el-form slot="reference">
								<el-form-item label="管理人投入资金参与比例" required>
									<span v-if="['6'].includes(dataType)">
										<span style="color: red" v-if="publicCompare('managerInvestmentRatio', '管理人投入资金参与比例', 'riskInfo')"
											>(未复核)</span
										>
									</span>
								</el-form-item>
							</el-form>
						</el-popover>
					</div>
					<div class="div2">
						<el-input v-model="riskInfo.managerInvestmentRatio" :disabled="isBaseDisabled" @input="focusUpdate"></el-input>
						<div class="blurmsg" v-if="isCheck && !!!riskInfo.managerInvestmentRatio">请输入理人投入资金参与比例</div>
					</div>
				</li>

				<li class="lis">
					<div class="div2">
						<el-popover placement="top-start" width="200" trigger="hover" :content="$store.getters.hoverPerty.riskInfo.managerIsPartake">
							<el-form slot="reference">
								<el-form-item label="管理人附属机构自有资金是否参与" required>
									<span v-if="['6'].includes(dataType)">
										<span
											style="color: red"
											v-if="publicCompare('managerIsPartake', '管理人附属机构自有资金是否参与', 'riskInfo')"
											>(未复核)</span
										>
									</span>
								</el-form-item>
							</el-form>
						</el-popover>
					</div>
					<div class="div3">
						<el-radio-group
							v-model="riskInfo.managerIsPartake"
							:disabled="isBaseDisabled"
							@change="changeClear(['managerPartakeAmount', 'managerPartakeRatio'])"
						>
							<el-radio label="0">有</el-radio>
							<el-radio label="1">无</el-radio>
						</el-radio-group>
						<div class="blurmsg" v-if="isCheck && !!!riskInfo.managerIsPartake">请选择管理人附属机构自有资金是否参与</div>
					</div>
				</li>

				<li class="lis" v-if="riskInfo.managerIsPartake === '0'">
					<div class="div2">
						<el-popover
							placement="top-start"
							width="200"
							trigger="hover"
							:content="$store.getters.hoverPerty.riskInfo.managerPartakeAmount"
						>
							<el-form slot="reference">
								<el-form-item label="管理人及其附属机构自有资金参与金额（万元）" required>
									<span v-if="['6'].includes(dataType)">
										<span
											style="color: red"
											v-if="publicCompare('managerPartakeAmount', '管理人及其附属机构自有资金参与金额（万元）', 'riskInfo')"
											>(未复核)</span
										>
									</span>
								</el-form-item>
							</el-form>
						</el-popover>
					</div>
					<div class="div2">
						<el-input v-model="riskInfo.managerPartakeAmount" :disabled="isBaseDisabled" @input="focusUpdate"></el-input>
						<div class="blurmsg" v-if="isCheck && !!!riskInfo.managerPartakeAmount">请输入管理人及其附属机构自有资金参与金额（万元）</div>
					</div>
					<div class="div2">
						<el-popover
							placement="top-start"
							width="200"
							trigger="hover"
							:content="$store.getters.hoverPerty.riskInfo.managerPartakeRatio"
						>
							<el-form slot="reference">
								<el-form-item label="管理人及其附属机构自有资金参与比例（%）" required>
									<span v-if="['6'].includes(dataType)">
										<span
											style="color: red"
											v-if="publicCompare('managerPartakeRatio', '管理人及其附属机构自有资金参与比例（%）', 'riskInfo')"
											>(未复核)</span
										>
									</span>
								</el-form-item>
							</el-form>
						</el-popover>
					</div>
					<div class="div2">
						<el-input v-model="riskInfo.managerPartakeRatio" :disabled="isBaseDisabled" @input="focusUpdate"></el-input>
						<div class="blurmsg" v-if="isCheck && !!!riskInfo.managerPartakeRatio">请输入管理人及其附属机构自有资金参与比例（%）</div>
					</div>
				</li>
			</template>
		</ul>
	</div>
</template>
<script>
import { riskInfo } from '@/api/productApi/infoMain'
import { publicCompare } from '@/views/infoMain/specialList/components/dataCheck'
import { risklnReview } from '@/views/infoMain/specialList/components/dataReview'
import { jsonArray } from '@/api/productApi/file'
import { digitalInput } from '@/utils/DigitalInput'
export default {
	props: {
		setpFunc: {
			type: Function,
			default: Function
		},
		fundSysCode: {
			type: String,
			default: ''
		},
		dataType: {
			type: String,
			default: ''
		}
	},
	data() {
		return {
			riskInfo: {
				isInnovateNature: '',
				openFrequency: '',
				fiduciaryDuty: '',
				settleCurrency: '',
				isCheckCompliance: ''
			},
			isBaseDisabled: false,
			isCheck: false,
			publicCompare,
			earlyWarnLineTypeList: [
				{ typeName: '单位净值', typeCode: '1' },
				{ typeName: '复权单位净值', typeCode: '2' },
				{ typeName: '累计单位净值', typeCode: '3' }
			],
			retracementList: [
				{ typeName: '滚动1年', typeCode: '1' },
				{ typeName: '成立以来', typeCode: '2' }
			],
			netWorloading: false
		}
	},

	mounted() {},

	methods: {
		clearData() {
			this.riskInfo.managerIsInvestment = ''
			this.riskInfo.managerInvestmentAmount = ''
			this.riskInfo.managerInvestmentRatio = ''
			this.riskInfo.managerIsPartake = ''
			this.riskInfo.managerPartakeAmount = ''
			this.riskInfo.managerPartakeRatio = ''
		},

		earlyRemoteMethod(val) {
			this.riskInfo.earlyWarnLineType = val
		},

		stopRemoteMethod(val) {
			this.riskInfo.stopLossLineType = val
		},

		retrRemoteMethod(val) {
			this.riskInfo.retreatWarnLineType = val
		},

		lintRemoteMethod(val) {
			this.riskInfo.retreatStopLossLineType = val
		},

		focusUpdate() {
			this.$forceUpdate()
		},

		// 重新申请将数据集中在store
		updateStoreData() {
			const Info = this.$store.state.fundStep.specialtTotalData.productFundInfo
				? this.$store.state.fundStep.specialtTotalData.productFundInfo.riskInfo
				: {}
			const keyList = Object.keys(this.riskInfo)
			// 判断主表与申请表是否有不相同的项
			let isSame = false
			keyList.forEach(item => {
				const applyValue = this.riskInfo[item] ? this.riskInfo[item] : ''
				const InfoValue = Info[item] ? Info[item] : ''
				if (item !== 'isCheckCompliance') {
					if (applyValue !== InfoValue) {
						// 步骤数据发生改变，则将步骤 合规是否复核 设置为否
						isSame = true
					}
				}
			})
			// 重新申请、完善、查看、复核不判断，其他则进行判断，防止变更单步骤保存
			if (!['5', '1', '2', '6', '4'].includes(this.dataType)) {
				this.riskInfo.isCheckCompliance = isSame ? '1' : this.riskInfo.isCheckCompliance
			}
			this.$store.state.fundStep.specialtTotalData.productFundApply.riskInfo = this.riskInfo
		},

		isBaseDisabledCom(data, msgShow) {
			this.isBaseDisabled = data
			this.isCheck = msgShow
		},

		edit(data) {
			this.riskInfo = jsonArray(data)
			this.riskInfo.isCheckCompliance = this.riskInfo.isCheckCompliance ? this.riskInfo.isCheckCompliance : '1'
		},

		changeClear(list) {
			list.forEach(item => {
				this.riskInfo[item] = ''
			})
			this.focusUpdate()
		},

		// 完善信息切换步骤时保存切换前页面数据
		async switchingSteps() {
			this.riskInfo.isCheckCompliance = '1'
			const params = { productFundApply: {}, fundRaiseType: '2' }
			params.productFundApply.riskInfo = this.riskInfo
			params.fundSysCode = this.fundSysCode
			await riskInfo(params).then(res => {
				if (res.msgCode === 'Y') {
					this.$emit('setpFunc', '1', this.fundSysCode, '', 1)
				}
			})
			return true
		},

		scale(obj, property) {
			// 规定只能输入数字
			if (obj[property]) {
				obj[property] = digitalInput(obj[property])
			}
			this.focusUpdate()
		},

		ValidationRequired() {
			return risklnReview(this.riskInfo)
		},

		// 新增:【保存】和【下一步】
		startDown(type) {
			this.isCheck = true
			this.CustomtextComfirm(() => {
				this.riskInfo.isCheckCompliance = '1'
				const params = { productFundApply: {}, fundRaiseType: '2' }
				params.productFundApply.riskInfo = this.riskInfo
				params.fundSysCode = this.fundSysCode
				riskInfo(params).then(res => {
					if (res.msgCode === 'Y') {
						if (type === '下一步') {
							this.$emit('setpFunc', '1', this.fundSysCode, '', 0)
						} else {
							this.$emit('setpFunc', '1', this.fundSysCode, '', 1)
						}
						this.$message({ type: 'success', message: res.msg })
					}
				})
			}, `${!risklnReview(this.riskInfo).length ? '此操作将永久提交已编辑数据，是否继续' : `必填项 “ ${risklnReview(this.riskInfo).join('、')} ” 未填写，是否确认提交`}？`)
		},

		getData() {
			// 当切换到风控信息时，使用全局数据联动本页面
			this.$store.state.fundStep.specialBaseInfo = jsonArray(this.$store.state.fundStep.specialtTotalData.productFundApply.baseInfo)
		}
	}
}
</script>
<style lang="scss" scoped >
</style>
